/**
 * 获取页面组件
 * @param path
 * @param modules
 * @param type
 * @returns {(function(): Promise<{}>)|*|boolean}
 */
export function getPageComponent(path, modules, type = "module") {
	const module = modules["/src/views" + path + ".vue"];
	if (module) {
		if (type == "module") {
			return module;
		}
		if (type == "boolean") {
			return true;
		}
	} else {
		if (type == "module") {
			return () => import("@/views/error/404_2.vue");
		}
		if (type == "boolean") {
			return false;
		}
	}
}
